#!/usr/bin/env python3
# -*- coding: utf-8 -*-

# @author: luohong
# @contact: luohong_studio@163.com
# @time: 2018/7/26
# @desc: 控制流练习 while语句

# while语句

# 正确答案
key = "yes"
# 当前状态
status = 0
# 当条件为真，循环执行下面语句
while status == 0:
    yourInput = input("LuoHong is a handsome boy? yes or no \n")
    if key == yourInput:
        print("Congratulations! you're right.")
        # 改变当前状态
        status = 1
    elif yourInput == "no":
        print("You are an idiot!")
    else:
        print("please input yes or no")
# 当条件为假，结束
else:
    print("Done!")